package controller;

import java.util.List;

import model.KlsEstadoDocumentoTransporte;
import org.hibernate.HibernateException;
import org.hibernate.Session;

import util.HibernateUtil;

public class KlsEstadoDocumentoTransporteManager {
	
    public KlsEstadoDocumentoTransporte load(int idEstadoDocumentoTransporte) {
        
    	Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();
        KlsEstadoDocumentoTransporte klsEstadoDocumentoTransporte = null;
        
        try {
        	
        	klsEstadoDocumentoTransporte = (KlsEstadoDocumentoTransporte) session.get(KlsEstadoDocumentoTransporte.class, idEstadoDocumentoTransporte);	
        	session.getTransaction().commit();
        	
        } catch (HibernateException e) {
            e.printStackTrace();
            session.getTransaction().rollback();
        }

        return klsEstadoDocumentoTransporte;
    }

}
